package kassiopeia.commons;

import java.io.Serializable;
import org.apache.commons.lang.builder.ToStringBuilder;

public class VMSummary implements Serializable {

    private static final long serialVersionUID = 7149547992544620297L;

    /*
     * Memory
     */

    /**
     * Returns the amount of free memory in the Java Virtual Machine.
     */
    private long freeMemory;

    /**
     * Returns the total amount of memory in the Java virtual machine.
     */
    private long totalMemory;

    /*
     * VM
     */

    /**
     * Returns the Java virtual machine implementation name.
     */
    private String vmName;

    /**
     * Returns the Java virtual machine implementation vendor.
     */
    private String vmVendor;

    /**
     * Returns the Java virtual machine implementation version.
     */
    private String vmVersion;

    /**
     * Returns the uptime of the Java virtual machine in milliseconds.
     */
    private long vmUptime;

    /*
     * OS
     */

    /**
     * Returns the operating system architecture.
     */
    private String osArch;

    /**
     * Returns the operating system version.
     */
    private String osVersion;

    /**
     * Returns the operating system name.
     */
    private String osName;

    /**
     * Returns the number of processors available to the Java virtual machine.
     */
    private int availableProcessors;

    /*
     * HDD
     */

    private long hddFreeSpace;

    private long hddTotalSpace;

    /*
     * Classes stats
     */

    private int loadedClassesCount;

    /*
     * Threads stats
     */

    private int threadCount;

    private int peakThreadCount;

    private int daemonThreadCount;


    public long getFreeMemory() {
        return freeMemory;
    }

    public void setFreeMemory(long freeMemory) {
        this.freeMemory = freeMemory;
    }

    public long getTotalMemory() {
        return totalMemory;
    }

    public void setTotalMemory(long totalMemory) {
        this.totalMemory = totalMemory;
    }

    public String getVmName() {
        return vmName;
    }

    public void setVmName(String vmName) {
        this.vmName = vmName;
    }

    public String getVmVendor() {
        return vmVendor;
    }

    public void setVmVendor(String vmVendor) {
        this.vmVendor = vmVendor;
    }

    public String getVmVersion() {
        return vmVersion;
    }

    public void setVmVersion(String vmVersion) {
        this.vmVersion = vmVersion;
    }

    public long getVmUptime() {
        return vmUptime;
    }

    public void setVmUptime(long vmUptime) {
        this.vmUptime = vmUptime;
    }

    public String getOsArch() {
        return osArch;
    }

    public void setOsArch(String osArch) {
        this.osArch = osArch;
    }

    public String getOsVersion() {
        return osVersion;
    }

    public void setOsVersion(String osVersion) {
        this.osVersion = osVersion;
    }

    public String getOsName() {
        return osName;
    }

    public void setOsName(String osName) {
        this.osName = osName;
    }

    public int getAvailableProcessors() {
        return availableProcessors;
    }

    public void setAvailableProcessors(int availableProcessors) {
        this.availableProcessors = availableProcessors;
    }

    public long getHddFreeSpace() {
        return hddFreeSpace;
    }

    public void setHddFreeSpace(long hddFreeSpace) {
        this.hddFreeSpace = hddFreeSpace;
    }

    public long getHddTotalSpace() {
        return hddTotalSpace;
    }

    public void setHddTotalSpace(long hddTotalSpace) {
        this.hddTotalSpace = hddTotalSpace;
    }

    public int getLoadedClassesCount() {
        return loadedClassesCount;
    }

    public void setLoadedClassesCount(int loadedClassesCount) {
        this.loadedClassesCount = loadedClassesCount;
    }

    public int getThreadCount() {
        return threadCount;
    }

    public void setThreadCount(int threadCount) {
        this.threadCount = threadCount;
    }

    public int getPeakThreadCount() {
        return peakThreadCount;
    }

    public void setPeakThreadCount(int peakThreadCount) {
        this.peakThreadCount = peakThreadCount;
    }

    public int getDaemonThreadCount() {
        return daemonThreadCount;
    }

    public void setDaemonThreadCount(int daemonThreadCount) {
        this.daemonThreadCount = daemonThreadCount;
    }

    @Override
    public String toString() {
        return ToStringBuilder.reflectionToString(this);
    }
}
